<%@ page contentType="text/html; charset=utf-8" language="java"
	import="java.sql.*" errorPage=""%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'editArticle.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<style type="text/css">
<!--
body {
	background-image: url("image/background.jpg");
}
-->
</style>
	</head>

	<body>
		<div>
			您好：
			<s:property value="#session.user.name" />
			&nbsp;
			<a href="manage.action">管理博客</a>&nbsp;
			<a href="logout.action">退出</a>
			<div align="right">
				<form action="query.action" method="post">
					<input type="text" name="name">
					<select name="type">
						<option value="1">
							用户名
						</option>
						<option value="2">
							博文
						</option>
						<option value="3">
							相册
						</option>
					</select>
					<input type="submit" value="搜索">
				</form>
			</div>
		</div>

		<div>
			<s:property value="#session.user.name" />
			的博客
			<div>
				<img src='<s:property value="#session.user.image"/>' height="50px"
					width="50px">
			</div>
		</div>
		<div align="center">
			<a href="manage.action">首页</a>|
			<a href="checkArticles.action">日志</a> |
			<a href="checkAlbums.action">相册</a>|
			<a href="checkArticleClasses.action">个人中心</a>
		</div>
		<div align="center">
			<form action="modifyArticle.action" method="post">
				<input type="hidden" name="article.id"
					value="<s:property value="#request.article.id"/>">
				标题：
				<input type="text" name="article.title"
					value="<s:property value="#request.article.title"/>" width="400px;">
				<br />
				正文：
				<textarea name="article.content" style="width: 400px;height: 200px;">
				<s:property value="#request.article.content" />
			</textarea>
				<br />
				分类：
				<select name="article.articleClass.id">
					<s:iterator value="#request.user.articleClasses" status="ac">
						<s:if test="#request.article.articleClass.id==id">
							<option value="<s:property value="id"/>" selected="selected">
								<s:property value="title" />
							</option>
						</s:if>
						<s:else>
							<option value="<s:property value="id"/>">
								<s:property value="title" />
							</option>
						</s:else>
					</s:iterator>
				</select>
				<br />
				<input type="submit" value="保存">
			</form>
		</div>

	</body>
</html>
